$(function () {
    var errot_data =  '<div class="weui-cells">'+
        '<div class="weui-cell">'+
        '<div class="weui-cell__hd"></div>'+
        '<div class="weui-cell__bd">'+
        '无历史数据'+
        '</div>'+
        '<div class="weui-cell__ft"></div>'+
        '</div>'+
        '</div>';
    $.ajax({
        url: "../../../front/php/hisatory.php",
        data: {},
        dataType: "json",
        type: "GET",
        success: function (d) {
            $.each(d,function (i,v) {
                var his_html = '';
                if(v.code == "F"){
                    his_html = '<div class="weui-cells">'+
                        '<div class="weui-cell">'+
                        '<div class="weui-cell__hd">时间：</div>'+
                        '<div class="weui-cell__bd">'+
                        v.hsy_time+
                        '</div>'+
                        '<div class="weui-cell__ft"></div>'+
                        '</div>'+
                        '<div class="weui-cell">'+
                        '<div class="weui-cell__hd">' +
                        v.hsy_rent_time+ '　租　' +
                        '</div>'+
                        '<div class="weui-cell__bd">'+
                        v.hsy_rent_place+
                        '</div>'+
                        '<div class="weui-cell__ft"></div>'+
                        '</div>'+
                        '<div class="weui-cell">'+
                        '<div class="weui-cell__hd">' +
                        v.hsy_still_time +
                        '　还　</div>'+
                        '<div class="weui-cell__bd">'+
                        v.hsy_still_place+
                        '</div>'+
                        '<div class="weui-cell__ft"></div>'+
                        '</div>'+
                        '</div>'
                } else {
                    his_html = errot_data
                }

                $(".hsy_wrap").append(his_html)
            })
        },
        error:function () {
            $(".hsy_wrap").append(errot_data)
        }
    })
})

